<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  
</head>
<body>
  <div id="app">
      <button @click="add">增加新属性</button>
      <button @click="change">修改新属性</button>
      <div v-if="isShow">
        {{msg}}
      </div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data:{
        isShow: false
      },
      methods:{
        change(){
          this.msg = 'hello world';
        },
        add(){
          this.isShow = true;
          this.msg = "你好世界";
        }
      }
    })
  </script>
</body>
</html>